<template>
  <n-carousel show-arrow autoplay class="mb-6">
    <img
      v-for="(item, index) in data"
      :key="index"
      class="carousel-img"
      :src="item.src"
    />
  </n-carousel>
</template>

<script setup lang="ts">
import { NCarousel } from "naive-ui";
import { ImgItemType } from "@/utils/types";

const props = defineProps<{
  data: ImgItemType[];
}>();

console.log(props.data);
</script>
<style scoped>
.carousel-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
</style>
